local skel = fk.CreateSkill {
  name = "#whitefox_skill",
  attached_equip = "whitefox",
  tags = {Skill.Compulsory},
}

skel:addEffect(fk.EventPhaseStart, {
  anim_type = "offensive",
  priority = 0.01,
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(skel.name) and player.phase == Player.Play
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:broadcastPlaySound("./packages/moepack/audio/card/whitefox")
    room:delay(500)

    room:useVirtualCard("analeptic", nil, player, player, skel.name, false)
    if player.dead then return false end

    room:damage { from = nil, to = player, damage = 1, skillName = skel.name }
  end,
})

Fk:loadTranslationTable{
  ["#whitefox_skill"] = "白狐",
}

return skel
